home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / JSliderBeanInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  5.5 KB  |  59 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Image;
  4. import java.beans.BeanDescriptor;
  5. import java.beans.PropertyDescriptor;
  6. import java.beans.SimpleBeanInfo;
  7. import javax.swing.beaninfo.SwingBeanInfo;
  8.  
  9. public class JSliderBeanInfo extends SwingBeanInfo {
  10.    private static final Class classJSlider;
  11.    // $FF: synthetic field
  12.    static Class class$javax$swing$JSlider;
  13.  
  14.    static {
  15.       classJSlider = class$javax$swing$JSlider != null ? class$javax$swing$JSlider : (class$javax$swing$JSlider = class$("javax.swing.JSlider"));
  16.    }
  17.  
  18.    // $FF: synthetic method
  19.    static Class class$(String var0) {
  20.       try {
  21.          return Class.forName(var0);
  22.       } catch (ClassNotFoundException var2) {
  23.          throw new NoClassDefFoundError(((Throwable)var2).getMessage());
  24.       }
  25.    }
  26.  
  27.    private PropertyDescriptor createPropertyDescriptor(String var1, Object[] var2) {
  28.       return super.createPropertyDescriptor(classJSlider, var1, var2);
  29.    }
  30.  
  31.    public BeanDescriptor getBeanDescriptor() {
  32.       return ((SwingBeanInfo)this).createBeanDescriptor(classJSlider, new Object[]{"preferred", Boolean.TRUE, "isContainer", Boolean.FALSE, "shortDescription", "A component that supports selecting a integer value from a range."});
  33.    }
  34.  
  35.    public Image getIcon(int var1) {
  36.       switch (var1) {
  37.          case 1:
  38.             Image var5 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JSliderColor16.gif");
  39.             return var5 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor16.gif") : var5;
  40.          case 2:
  41.             Image var4 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JSliderColor32.gif");
  42.             return var4 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentColor32.gif") : var4;
  43.          case 3:
  44.             Image var3 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JSliderMono16.gif");
  45.             return var3 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono16.gif") : var3;
  46.          case 4:
  47.             Image var2 = ((SimpleBeanInfo)this).loadImage("beaninfo/images/JSliderMono32.gif");
  48.             return var2 == null ? ((SimpleBeanInfo)this).loadImage("beaninfo/images/JComponentMono32.gif") : var2;
  49.          default:
  50.             return super.getIcon(var1);
  51.       }
  52.    }
  53.  
  54.    public PropertyDescriptor[] getPropertyDescriptors() {
  55.       Object[] var1 = new Object[]{"VERTICAL", new Integer(1), "JSlider.VERTICAL", "HORIZONTAL", new Integer(0), "JSlider.HORIZONTAL"};
  56.       return new PropertyDescriptor[]{this.createPropertyDescriptor("UIClassID", new Object[]{"shortDescription", "UIClassID"}), this.createPropertyDescriptor("accessibleContext", new Object[]{"shortDescription", "accessibleContext"}), this.createPropertyDescriptor("UI", new Object[]{"bound", Boolean.TRUE, "hidden", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "The UI object that implements the slider's LookAndFeel."}), this.createPropertyDescriptor("value", new Object[]{"bound", Boolean.FALSE, "preferred", Boolean.TRUE, "shortDescription", "The sliders current value."}), this.createPropertyDescriptor("valueIsAdjusting", new Object[]{"bound", Boolean.FALSE, "expert", Boolean.TRUE, "shortDescription", "True if the slider knob is being dragged."}), this.createPropertyDescriptor("orientation", new Object[]{"bound", Boolean.TRUE, "enumerationValues", var1, "preferred", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Set the scrollbars orientation to either VERTICAL or HORIZONTAL. "}), this.createPropertyDescriptor("inverted", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "If true reverses the slider values from their normal order"}), this.createPropertyDescriptor("extent", new Object[]{"bound", Boolean.FALSE, "expert", Boolean.TRUE, "shortDescription", "Size of the range covered by the knob."}), this.createPropertyDescriptor("maximum", new Object[]{"bound", Boolean.FALSE, "preferred", Boolean.TRUE, "shortDescription", "The sliders maximum value."}), this.createPropertyDescriptor("snapToTicks", new Object[]{"bound", Boolean.TRUE, "shortDescription", "If true snap the knob to the nearest tick mark."}), this.createPropertyDescriptor("minimum", new Object[]{"bound", Boolean.FALSE, "preferred", Boolean.TRUE, "shortDescription", "The sliders minimum value."}), this.createPropertyDescriptor("majorTickSpacing", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Sets the number of values between major tick marks."}), this.createPropertyDescriptor("model", new Object[]{"bound", Boolean.TRUE, "shortDescription", "The sliders BoundedRangeModel."}), this.createPropertyDescriptor("paintTrack", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "If true, the track is painted on the slider."}), this.createPropertyDescriptor("labelTable", new Object[]{"bound", Boolean.TRUE, "hidden", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Specifies what labels will be drawn for any given value."}), this.createPropertyDescriptor("paintTicks", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "If true tick marks are painted on the slider."}), this.createPropertyDescriptor("minorTickSpacing", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "Sets the number of values between minor tick marks."}), this.createPropertyDescriptor("paintLabels", new Object[]{"bound", Boolean.TRUE, "visualUpdate", Boolean.TRUE, "shortDescription", "If true labels are painted on the slider."})};
  57.    }
  58. }
  59.